import requests  
  
class Ai:  
    ai_url = None
    authorization = None
    input_name = None
    output_name = None
  
    @classmethod  
    def query(cls, content):  
        headers = {  
            'Authorization': 'Bearer ' + cls.authorization,  
            'Content-Type': 'application/json'  
        }  
        payload = {"input": {cls.input_name: content}}  
        response = requests.post(cls.ai_url, headers=headers, json=payload)  
        if response.status_code == 200:  
            return response.json()  
        else:  
            print(f"Request failed with status {response.status_code}")  
            return None  